package headfirst.strategy;

public class LogReporter
{
	protected MsgSendBehavior m_msgsender=null;
	public boolean doLogRead()
	{
		//todo log read logic 
		System.out.println("in LogReporter.doLogRead(), the common log read logic which can be reuse in any LogReporter child class");
		return true;
	}

	public boolean doLogCount()
	{
		//todo log count and report generation logic
		System.out.println("in LogReporter.doLogCount, the common log count logic which can be reuse in any LogReporter child class");
		return true;
	}

	public void setSend(MsgSendBehavior msgsender)
	{
		this.m_msgsender=msgsender;
	}
	
	public boolean doReportSend()
	{
		if(null != this.m_msgsender)
		{
			return this.m_msgsender.doSend();
		}
		return false;
	}
}
 
